<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>Document</title>
    </head>
    <body></body>
</html>
<script>
    const regx1 = /[\d:\-,]+/g;
    const regx2 = /[^\d:\-,]+/g;
    const str = `张三:010-12345678,李四:010-87654321`;
    console.log(str.match(regx1)); // [':010-12345678,', ':010-87654321']
    console.log(str.match(regx2)); // ['张三', '李四']
</script>
